import { request } from "@/network/request";
import axios from "axios";

export function pay(amount, info, id) {
  return request({
    method: "POST", // 发送方法 GET POST DELETE PUT
    url: "/sys/api/pay", // url地址后缀完整的在外部
    params: {
      amount: amount,
      info: info,
      id: id
    },
    headers: {
      // 头文件封装
      Authorization: sessionStorage.getItem("userToken"),
      // 格式设置
      "Content-Type": "application/json"
    }
  });
}
export function dmoney(formdata) {
  return request({
    baseURL: "/msglen",
    method: "POST", // 发送方法 GET POST DELETE PUT
    url: "/donation/donationthings/donationMoney",
    data: formdata,
    headers: {
      // 头文件封装
      token: sessionStorage.getItem("userToken"),
      // 格式设置
      "content-type": "multipart/form-data;"
    }
  });
}
export function dgoods(formdata) {
  return request({
    baseURL: "/msglen",
    method: "POST", // 发送方法 GET POST DELETE PUT
    url: "/donation/donationthings/save", // url地址后缀完整的在外部
    data: formdata,
    headers: {
      // 头文件封装
      token: sessionStorage.getItem("userToken"),
      // 格式设置
      "content-type": "multipart/form-data;"
    }
  });
}
